Sistemas y Señales Biomédicos

Ingeniería Biomédica

Ph.D. Pablo Eduardo Caicedo Rodríguez

2025-04-09

Sistemas y Señales Biomedicos - SYSB

Digital Filters

Why the Z-Transform?

  • The Fourier Transform assumes signals are stable and well-behaved
  • But some biosignals or systems may not be absolutely summable
  • The Z-Transform generalizes the Fourier Transform
  • Useful for analyzing discrete-time systems, especially when stability and causality matter

Definition

Let \(x[n]\) be a discrete-time signal.

The Z-Transform is defined as:

\[X(z) = \sum_{n=-\infty}^{\infty} x[n] z^{-n}\]

Where: - \(z \in \mathbb{C}\) is a complex variable - \(z = re^{j\omega}\)

Region of Convergence (ROC)

  • The Z-Transform converges only for certain values of \(z\)
  • The set of \(z\) for which the series converges is the ROC
  • ROC is critical for system stability and causality

Causal Signals
ROC is outside outermost pole

Anti-Causal Signals
ROC is inside innermost pole

Z-Plane Representation

  • Poles: values of \(z\) where \(X(z) \to \infty\)
  • Zeros: values where \(X(z) = 0\)
  • Visualization of poles and zeros helps in understanding system behavior

\[H(z) = 1.00 \cdot \frac{(z - 0.50)}{(z - 0.90)}\]

(-1.5, 1.5)
(-1.5, 1.5)

Relationship with Fourier Transform

If the ROC includes the unit circle, \(|z| = 1\), then:

\[X(e^{j\omega}) = \sum_{n=-\infty}^{\infty} x[n] e^{-j\omega n}\]

So the Fourier Transform is a special case of the Z-Transform.

Example Signal

Let:

\[x[n] = a^n u[n]\]

Where: - \(a \in \mathbb{R}\) - \(u[n]\) is the unit step function (0 for \(n<0\), 1 for \(n\geq 0\))

Step 1: Z-Transform

Apply the definition:

\[X(z) = \sum_{n=0}^{\infty} a^n z^{-n} = \sum_{n=0}^{\infty} (az^{-1})^n\]

This is a geometric series:

\[X(z) = \frac{1}{1 - az^{-1}} = \frac{z}{z - a}\]

What is a Geometric Series?

A geometric series is a sum of terms where each term is multiplied by the same constant:

\[S = \sum_{n=0}^{\infty} r^n = 1 + r + r^2 + r^3 + \cdots\]

The value of \(r\) determines whether this sum converges (has a finite limit) or diverges.

Goal

Understand why this series:

\[\sum_{n=0}^{\infty} r^n\]

converges if and only if:

\[\boxed{|r| < 1}\]

Partial Sums

Let’s consider the sum up to the \(N\)-th term:

\[S_N = \sum_{n=0}^{N} r^n = 1 + r + r^2 + \cdots + r^N\]

This has a closed-form expression:

\[S_N = \frac{1 - r^{N+1}}{1 - r} \quad \text{for } r \neq 1\]

Taking the Limit

To find the sum of the infinite series, take the limit as \(N \to \infty\):

\[S = \lim_{N \to \infty} S_N = \lim_{N \to \infty} \frac{1 - r^{N+1}}{1 - r}\]

Case 1: \(|r| < 1\)

If \(|r| < 1\), then:

\[r^{N+1} \to 0 \quad \text{as } N \to \infty\]

So the sum becomes:

\[S = \frac{1}{1 - r}\]

✅ The geometric series converges.

Case 2: \(|r| \geq 1\)

  • If \(r = 1\), then \(S_N = N + 1 \to \infty\)
  • If \(r = -1\), the sum oscillates: \(1 - 1 + 1 - 1 + \cdots\)
  • If \(|r| > 1\), then \(r^{N+1} \to \infty\)

❌ In all cases: the series diverges

Intuition

  • When \(|r| < 1\), each term \(r^n\) gets smaller and smaller
  • Their total sum settles to a finite number
  • When \(|r| \geq 1\), the terms don’t vanish — the sum keeps growing or oscillating

Example: \(r = 0.5\)

\[S = 1 + 0.5 + 0.25 + 0.125 + \cdots = \frac{1}{1 - 0.5} = 2\]

Every term adds less. The sum “flattens out.”

Why This Matters

The Z-Transform often gives us geometric series like:

\[\sum_{n=0}^{\infty} (az^{-1})^n\]

This converges only if:

\[|az^{-1}| < 1 \Rightarrow |z| > |a|\]

So, understanding convergence of geometric series = understanding ROC in Z-transforms.

Summary

Condition Behavior Result
\(|r| < 1\) Terms shrink Series converges
\(|r| \geq 1\) Terms grow or oscillate Diverges

\[\sum_{n=0}^{\infty} r^n = \frac{1}{1 - r} \quad \text{if } |r| < 1\]

Step 2: Region of Convergence (ROC)

For convergence of the geometric series:

\[|az^{-1}| < 1 \Rightarrow |z| > |a|\]

Therefore, the ROC is:

\[\boxed{|z| > |a|}\]

Interpretation

  • Causal signal (defined for \(n \geq 0\))
  • ROC is outside the outermost pole
  • Stable system only if ROC includes the unit circle \(|z| = 1\)

Example: \(a = 0.5\)

\[x[n] = (0.5)^n u[n]\]

Z-Transform:

\[X(z) = \sum_{n=0}^{\infty} (0.5)^n z^{-n} = \frac{z}{z - 0.5}\]

Region of Convergence:

\[\boxed{|z| > 0.5}\]

Summary

Signal Z-Transform ROC
\(x[n] = a^n u[n]\) \(\frac{z}{z - a}\) \(|z| > |a|\)
Example: \(a = 0.5\) \(\frac{z}{z - 0.5}\) \(|z| > 0.5\)

Properties of the Z-Transform

  • Linearity: \(a x[n] + b y[n] \to aX(z) + bY(z)\)
  • Time shifting: \(x[n - k] \to z^{-k} X(z)\)
  • Scaling in the z-domain: \(a^n x[n] \to X(z/a)\)
  • Convolution: \(x[n] * h[n] \to X(z)H(z)\)

Example

Let \(x[n] = a^n u[n]\), where \(|a| < 1\)

\[X(z) = \sum_{n=0}^{\infty} a^n z^{-n} = \frac{1}{1 - az^{-1}}, \quad \text{ROC: } |z| > |a|\]

Difference Equations in DSP

A difference equation relates input and output values at different time steps.

\[y[n] - a_1 y[n-1] - a_2 y[n-2] = b_0 x[n] + b_1 x[n-1]\]

Common in: - Digital filters (FIR, IIR) - Signal models in ECG, EEG analysis - Implementation in real-time biosignal systems

Z-Transform of Time-Shifted Terms

The Z-Transform turns time shifts into powers of \(z^{-1}\):

Time Domain Z-Domain
\(x[n]\) \(X(z)\)
\(x[n-k]\) \(z^{-k} X(z)\)
\(y[n-k]\) \(z^{-k} Y(z)\)

Step 1: Apply Z-Transform

Given:

\[y[n] - a_1 y[n-1] - a_2 y[n-2] = b_0 x[n] + b_1 x[n-1]\]

Apply \(\mathcal{Z} \{ \cdot \}\):

\[Y(z) - a_1 z^{-1} Y(z) - a_2 z^{-2} Y(z) = b_0 X(z) + b_1 z^{-1} X(z)\]

Step 2: Factor and Solve for \(H(z)\)

Group:

\[Y(z)(1 - a_1 z^{-1} - a_2 z^{-2}) = X(z)(b_0 + b_1 z^{-1})\]

Divide both sides:

\[H(z) = \frac{Y(z)}{X(z)} = \frac{b_0 + b_1 z^{-1}}{1 - a_1 z^{-1} - a_2 z^{-2}}\]

Example

Given:

\[y[n] - 0.9 y[n-1] = x[n] - 0.5 x[n-1]\]

Z-Transform:

\[Y(z)(1 - 0.9 z^{-1}) = X(z)(1 - 0.5 z^{-1})\]

Transfer Function:

\[H(z) = \frac{1 - 0.5 z^{-1}}{1 - 0.9 z^{-1}}\]

Poles and Zeros

Let’s analyze \(H(z)\):

  • Zeros: Roots of the numerator \(\Rightarrow z = 0.5\)
  • Poles: Roots of the denominator \(\Rightarrow z = 0.9\)

Pole-Zero Plot
Visualizes system behavior
Check for: - Stability (poles inside unit circle) - Frequency shaping

Practice

Convert this equation:

\[y[n] = 0.6 y[n-1] + x[n] + x[n-1]\]

Find: - \(H(z)\) - Poles and zeros - Plot them in the Z-plane

Application in Biosignal Processing

  • Analysis of digital filters for ECG, EEG, etc.
  • Design of stable and causal filtering systems
  • Useful in difference equation modeling of biosignals

Summary

  • Z-Transform is a powerful tool for analyzing discrete systems
  • Provides insight into stability, causality, and system behavior
  • A generalization of the Fourier Transform
  • Crucial in digital signal processing of biosignals
  • Z-Transform converts difference equations into algebraic expressions
  • Transfer function \(H(z)\) tells us how the system responds to inputs
  • Key for digital filter design in biosignal processing

Next Steps

  • Practice Z-Transform computations
  • Pole-zero plotting exercises
  • Application to real biosignal filtering problems